package net.wangds.auth.user.repo.rdbms;

import net.wangds.auth.user.entity.WexinUserEntity;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface WeixinUserJpaRepo extends AbstractAccountRefRepo<WexinUserEntity> {

    WexinUserEntity findByAccountIdAndAgentIdAndOpenId(String accountId, String agentId, String openId);
    WexinUserEntity findByAccountIdAndAgentIdAndUnionId(String accountId, String agentId, String unionId);

    List<WexinUserEntity> findByAccountIdAndAgentId(String accountId, String agentId);

    boolean existsByAgentIdAndOpenId(String agentId, String openId);
    boolean existsByAgentIdAndUnionId(String agentId, String unionId);
    
}
